#!/usr/bin/env python3
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.


from collections.abc import Callable, Sequence
from pathlib import Path
from typing import Any

import pytest

from cmk.agent_based.v1 import GetRateError, IgnoreResults, Metric, Result, Service, State
from cmk.agent_based.v2 import StringTable
from cmk.plugins.collection.agent_based import brocade_fcport as bf
from cmk.plugins.lib.brocade import DISCOVERY_DEFAULT_PARAMETERS
from tests.unit.cmk.plugins.collection.agent_based.snmp import (
    get_parsed_snmp_section,
    snmp_is_detected,
)

STRING_TABLE_INDEX_1_MISSING = [
    [
        [
            "45",
            "6",
            "1",
            "1",
            "2905743640",
            "886676077",
            "925307562",
            "12463206",
            "3618162349",
            "0",
            "0",
            "0",
            "0",
            "",
            "port44",
        ],
        [
            "46",
            "6",
            "1",
            "1",
            "3419046246",
            "972264932",
            "3137901401",
            "544788281",
            "569031932",
            "0",
            "0",
            "0",
            "82",
            "",
            "port45",
        ],
        [
            "47",
            "6",
            "1",
            "1",
            "1111764110",
            "2429196329",
            "4259150384",
            "1651642909",
            "569031932",
            "0",
            "0",
            "0",
            "6",
            "",
            "port46",
        ],
        [
            "48",
            "6",
            "1",
            "1",
            "1832010527",
            "3916222665",
            "596751007",
            "1430959330",
            "3618162349",
            "0",
            "0",
            "0",
            "0",
            "",
            "port47",
        ],
    ],
    [["45", "512"], ["46", "512"], ["47", "512"], ["48", "512"]],
    [
        ["805306369", "6", "100"],
        ["805306370", "24", "0"],
        ["805306371", "131", "0"],
        ["805306372", "1", "0"],
        ["805306373", "1", "0"],
        ["805306374", "1", "0"],
        ["805306375", "1", "0"],
        ["805306376", "1", "0"],
        ["805306377", "1", "0"],
        ["805306378", "1", "0"],
        ["1073741868", "56", "16000"],
        ["1073741869", "56", "16000"],
        ["1073741870", "56", "16000"],
        ["1073741871", "56", "16000"],
    ],
    [],
]


_STRING_TABLE_WITH_IF64: Sequence[StringTable] = [
    [
        [
            "1",
            "6",
            "1",
            "1",
            "",
            "",
            "446448961",
            "2436700923",
            "0",
            "0",
            "0",
            "0",
            "21",
            "",
            "VSP01_1A",
        ],
    ],
    [["33", "512"], ["37", "512"], ["47", "128"], ["48", "128"]],
    [
        ["1073741824", "56", "8000"],
    ],
    [
        [
            "16.0.0.39.248.67.123.0.0.0.0.0.0.0.0.0.1",
            # OIDBytes result is not handled correctly by typing
            [  # type: ignore[list-item]
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                55,
                70,
                32,
                70,
                51,
                32,
                50,
                48,
                32,
                70,
                66,
            ],
            # OIDBytes result is not handled correctly by typing
            [  # type: ignore[list-item]
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                50,
                32,
                53,
                50,
                32,
                54,
                52,
                32,
                67,
                68,
                32,
                55,
                67,
            ],
            # OIDBytes result is not handled correctly by typing
            [  # type: ignore[list-item]
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                49,
                65,
                32,
                70,
                68,
                32,
                52,
                57,
                32,
                48,
                53,
                32,
                50,
                56,
            ],
            # OIDBytes result is not handled correctly by typing
            [  # type: ignore[list-item]
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                70,
                32,
                49,
                56,
                32,
                56,
                50,
                32,
                70,
                50,
                32,
                56,
                69,
                32,
                56,
                48,
            ],
            # OIDBytes result is not handled correctly by typing
            [  # type: ignore[list-item]
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
                32,
                48,
                48,
            ],
        ],
    ],
]


@pytest.fixture(name="section_idx", scope="module")
def _get_section_idx() -> bf.Section:
    section = bf.parse_brocade_fcport(STRING_TABLE_INDEX_1_MISSING)
    assert section is not None
    return section


def test_discovery_idx(section_idx: bf.Section) -> None:
    assert sorted(
        bf.discover_brocade_fcport(
            {
                "admstates": [1],
                "phystates": [6],
                "opstates": [1],
                "show_isl": True,
                "use_portname": True,
            },
            section_idx,
        )
    ) == sorted(
        [
            Service(
                item="44 ISL port44", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}
            ),
            Service(
                item="45 ISL port45", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}
            ),
            Service(
                item="46 ISL port46", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}
            ),
            Service(
                item="47 ISL port47", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}
            ),
        ]
    )


def test_check_idx(section_idx: bf.Section) -> None:
    assert list(
        bf._check_brocade_fcport(
            "44 ISL port44",
            {
                "assumed_speed": 2.0,
                "phystate": [6],
                "notxcredits": (3.0, 20.0),
                "opstate": [1],
                "c3discards": (3.0, 20.0),
                "admstate": [1],
                "rxencinframes": (3.0, 20.0),
                "rxcrcs": (3.0, 20.0),
                "rxencoutframes": (3.0, 20.0),
            },
            section_idx,
            1658523186,
            {
                "rxwords.45": (1658523126, 0),
                "txwords.45": (1658523126, 0),
                "rxframes.45": (1658523126, 0),
                "txframes.45": (1658523126, 0),
                "rxcrcs.45": (1658523126, 0),
                "txcrcs.45": (1658523126, 0),
                "rxencoutframes.45": (1658523126, 0),
                "txencoutframes.45": (1658523126, 0),
                "rxencinframes.45": (1658523126, 0),
                "txencinframes.45": (1658523126, 0),
                "c3discards.45": (1658523126, 0),
                "notxcredits.45": (1658523126, 0),
            },
        )
    ) == [
        Result(
            state=State.CRIT,
            summary=(
                "ISL speed: 16 Gbit/s, In: 59.1 MB/s, Out: 194 MB/s, "
                "No TX buffer credits: 79.63%(!!), Physical: in sync, "
                "Operational: online, Administrative: online"
            ),
        ),
        Metric("in", 59111738.46666667, boundaries=(0.0, 2000000000.0)),
        Metric("out", 193716242.66666666, boundaries=(0.0, 2000000000.0)),
        Metric("rxframes", 207720.1),
        Metric("txframes", 15421792.7),
        Metric("rxcrcs", 0.0),
        Metric("rxencoutframes", 0.0),
        Metric("rxencinframes", 0.0),
        Metric("c3discards", 0.0),
        Metric("notxcredits", 60302705.81666667),
    ]


def test_check_with_if64() -> None:
    section = bf.parse_brocade_fcport(_STRING_TABLE_WITH_IF64)
    assert section
    assert list(
        bf._check_brocade_fcport(
            "00 VSP01_1A",
            {
                "rxcrcs": (3.0, 20.0),
                "rxencoutframes": (3.0, 20.0),
                "rxencinframes": (3.0, 20.0),
                "notxcredits": (3.0, 20.0),
                "c3discards": (3.0, 20.0),
                "assumed_speed": 2.0,
            },
            section,
            1658523186,
            {
                "rxwords.1": (
                    1658523126,
                    1153873149468594998701126521378387743953450940829170014,
                ),
                "txwords.1": (
                    1658523126,
                    1153873149468594998701126521378387743953450940822270011,
                ),
                "rxframes.1": (
                    1658523126,
                    4615492597874380058774580909699558447955101321101508290,
                ),
                "txframes.1": (
                    1658523126,
                    4615492597874380058774580751245745719547952741547325697,
                ),
                "rxcrcs.1": (1658523126, 0),
                "txcrcs.1": (1658523126, 0),
                "rxencoutframes.1": (1658523126, 0),
                "txencoutframes.1": (1658523126, 0),
                "rxencinframes.1": (1658523126, 0),
                "txencinframes.1": (1658523126, 0),
                "c3discards.1": (1658523126, 18),
                "notxcredits.1": (1658523126, 0),
                "bbcredit.00 VSP01_1A": (
                    1658523126,
                    4615492597874380058774580751237179345161915702775304352,
                ),
            },
        )
    ) == [
        Result(
            state=State.OK,
            summary="Speed: 8 Gbit/s, In: 6.67 kB/s, Out: 467 kB/s, Physical: in sync, Operational: online, Administrative: online",
        ),
        Metric("in", 6666.8, boundaries=(0.0, 1000000000.0)),
        Metric("out", 466667.0, boundaries=(0.0, 1000000000.0)),
        Metric("rxframes", 1333.35),
        Metric("txframes", 3333.35),
        Metric("rxcrcs", 0.0),
        Metric("rxencoutframes", 0.0),
        Metric("rxencinframes", 0.0),
        Metric("c3discards", 0.05),
        Metric("notxcredits", 0.0),
        Metric("fc_bbcredit_zero", 1500.0),
    ]


def _get_check_result(section: bf.Section, item: str) -> list[IgnoreResults | Metric | Result]:
    value_store: dict[str, Any] = {}

    for i in range(10):
        # initialize all 10 rates
        with pytest.raises(GetRateError):
            # TODO: there is something wrong with the plugin.
            # it take 10 test-cycles until all rates are valid.
            _ = list(
                bf._check_brocade_fcport(
                    item=item,
                    params={},
                    section=section,
                    this_time=2000 + i,
                    value_store=value_store,
                )
            )

    return list(
        bf._check_brocade_fcport(
            item=item,
            params={},
            section=section,
            this_time=9999900,
            value_store=value_store,
        )
    )


def test_interface_speed(as_path: Callable[[str], Path]) -> None:
    assert snmp_is_detected(bf.snmp_section_brocade_fcport, as_path(DATA_0))
    parsed = get_parsed_snmp_section(bf.snmp_section_brocade_fcport, as_path(DATA_0))
    assert parsed is not None
    assert list(
        bf.check_plugin_brocade_fcport.discovery_function(
            DISCOVERY_DEFAULT_PARAMETERS,
            parsed,
        )
    ) == [
        Service(item="2 port2", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}),
        Service(item="3 port3", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}),
        Service(item="4 ISL port4", parameters={"phystate": [6], "opstate": [1], "admstate": [1]}),
    ]

    assert _get_check_result(parsed, "003 port3") == [
        Result(
            state=State.OK,
            summary="Speed: 8 Gbit/s, In: 0.00 B/s, Out: 0.00 B/s, Physical: in sync, Operational: online, Administrative: online",
        ),
        Metric("in", 0.0, boundaries=(0.0, 1000000000.0)),
        Metric("out", 0.0, boundaries=(0.0, 1000000000.0)),
        Metric("rxframes", 0.0),
        Metric("txframes", 0.0),
        Metric("rxcrcs", 0.0),
        Metric("rxencoutframes", 0.0),
        Metric("rxencinframes", 0.0),
        Metric("c3discards", 0.0),
        Metric("notxcredits", 0.0),
        Metric("fc_bbcredit_zero", 0.0),
    ]

    assert _get_check_result(parsed, "004 ISL port4") == [
        Result(
            state=State.OK,
            summary="ISL speed: 8 Gbit/s, In: 0.00 B/s, Out: 0.00 B/s, Physical: in sync, Operational: online, Administrative: online",
        ),
        Metric("in", 0.0, boundaries=(0.0, 1000000000.0)),
        Metric("out", 0.0, boundaries=(0.0, 1000000000.0)),
        Metric("rxframes", 0.0),
        Metric("txframes", 0.0),
        Metric("rxcrcs", 0.0),
        Metric("rxencoutframes", 0.0),
        Metric("rxencinframes", 0.0),
        Metric("c3discards", 0.0),
        Metric("notxcredits", 0.0),
        Metric("fc_bbcredit_zero", 0.0),
    ]


# SUP-13143
DATA_0 = """
.1.3.6.1.2.1.1.2.0 .1.3.6.1.4.1.1588.2.1.1.1
.1.3.6.1.2.1.2.2.1.3.805306369 24
.1.3.6.1.2.1.2.2.1.3.805306370 6
.1.3.6.1.2.1.2.2.1.3.805306371 1
.1.3.6.1.2.1.2.2.1.3.805306372 1
.1.3.6.1.2.1.2.2.1.3.805306373 131
.1.3.6.1.2.1.2.2.1.3.805306374 1
.1.3.6.1.2.1.2.2.1.3.805306375 1
.1.3.6.1.2.1.2.2.1.3.1073741824 56
.1.3.6.1.2.1.2.2.1.3.1073741825 56
.1.3.6.1.2.1.2.2.1.3.1073741826 56
.1.3.6.1.2.1.2.2.1.3.1073741827 56
.1.3.6.1.2.1.2.2.1.3.1073741828 56
.1.3.6.1.2.1.2.2.1.3.1207959584 1
.1.3.6.1.2.1.2.2.1.3.1207991616 1
.1.3.6.1.2.1.31.1.1.1.15.805306369 0
.1.3.6.1.2.1.31.1.1.1.15.805306370 1000
.1.3.6.1.2.1.31.1.1.1.15.805306371 0
.1.3.6.1.2.1.31.1.1.1.15.805306372 0
.1.3.6.1.2.1.31.1.1.1.15.805306373 0
.1.3.6.1.2.1.31.1.1.1.15.805306374 0
.1.3.6.1.2.1.31.1.1.1.15.805306375 0
.1.3.6.1.2.1.31.1.1.1.15.1073741824 32000
.1.3.6.1.2.1.31.1.1.1.15.1073741825 32000
.1.3.6.1.2.1.31.1.1.1.15.1073741826 8000
.1.3.6.1.2.1.31.1.1.1.15.1073741827 8000
.1.3.6.1.2.1.31.1.1.1.15.1073741828 8000
.1.3.6.1.2.1.31.1.1.1.15.1207959584 0
.1.3.6.1.2.1.31.1.1.1.15.1207991616 0
.1.3.6.1.3.94.4.5.1.4.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.1 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.4.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.2 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.4.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.3 "00 00 00 37 E4 FB B0 D6 "
.1.3.6.1.3.94.4.5.1.4.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.4 "00 00 00 56 39 9A 30 BF "
.1.3.6.1.3.94.4.5.1.4.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.5 "00 00 01 DA 2A 7D 49 DC "
.1.3.6.1.3.94.4.5.1.5.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.1 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.5.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.2 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.5.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.3 "00 00 00 58 49 B4 C1 F0 "
.1.3.6.1.3.94.4.5.1.5.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.4 "00 00 01 68 81 D5 AE F7 "
.1.3.6.1.3.94.4.5.1.5.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.5 "00 00 00 0A BF 11 F0 B5 "
.1.3.6.1.3.94.4.5.1.6.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.1 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.6.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.2 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.6.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.3 "00 01 89 B1 93 3E FD D4 "
.1.3.6.1.3.94.4.5.1.6.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.4 "00 02 53 10 FA 6F 60 B8 "
.1.3.6.1.3.94.4.5.1.6.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.5 "00 0E 4F A0 51 61 93 B4 "
.1.3.6.1.3.94.4.5.1.7.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.1 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.7.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.2 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.7.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.3 "00 02 79 1B CC 99 C5 A4 "
.1.3.6.1.3.94.4.5.1.7.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.4 "00 0A D9 7B 33 D8 D5 5C "
.1.3.6.1.3.94.4.5.1.7.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.5 "00 00 4C B4 2C 40 76 A0 "
.1.3.6.1.3.94.4.5.1.8.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.1 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.8.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.2 "00 00 00 00 00 00 00 00 "
.1.3.6.1.3.94.4.5.1.8.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.3 "00 00 00 00 00 00 DC 4D "
.1.3.6.1.3.94.4.5.1.8.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.4 "00 00 00 00 00 13 AE 12 "
.1.3.6.1.3.94.4.5.1.8.16.0.136.148.113.39.235.220.0.0.0.0.0.0.0.0.5 "00 00 00 29 9D 75 67 86 "
.1.3.6.1.4.1.1588.2.1.1.1.2.9.1.1.1 1
.1.3.6.1.4.1.1588.2.1.1.1.2.9.1.1.2 2
.1.3.6.1.4.1.1588.2.1.1.1.2.9.1.1.3 3
.1.3.6.1.4.1.1588.2.1.1.1.2.9.1.1.4 4
.1.3.6.1.4.1.1588.2.1.1.1.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.1.4.1.1588.2.1.1.1.6.2.1.14.3 3849984522
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.14.4 502548382
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.14.5 1314845716
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.20.1 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.20.2 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.20.3 56397
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.20.4 1268924
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.20.5 3019259357
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21.1 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21.2 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21.3 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21.4 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.21.5 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22.1 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22.2 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22.3 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22.4 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.22.5 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26.1 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26.2 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26.3 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26.4 14
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.26.5 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28.1 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28.2 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28.3 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28.4 0
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.28.5 1
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36.1 "port0"
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36.2 "port1"
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36.3 "port2"
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36.4 "port3"
.1.3.6.1.4.1.1588.2.1.1.1.6.2.1.36.5 "port4"
"""
